/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.ulima.programacion.modulo2;

import javax.swing.JOptionPane;

/**
 *
 * @author profw51
 */
public class BreakContinue {

    public static void main(String[] args) {
        int n = 1, i;
        for (i = 0; i <= 4; i++) {
            if (i % 3 != 0) {
                n = n + 1;
                // break; // -> el break termina el bucle
                continue; // -> el continue termina la iteración
            }
            n = n + i;
        }
        JOptionPane.showMessageDialog(null, n);
    }
}
